package com.example.taobaou.utils;

import com.example.taobaou.model.domain.SelectedPage;

public class UrlUtils {
    public static String createHomePagerUrl(int mateialId, int page) {
        return "discovery/" + mateialId + "/" + page;
    }



    public static String getTicket(String url, int size) {
        if (url.startsWith("http") || url.startsWith("https")) {
            return url + "_" + size + "x" + size + ".jpg";
        } else {
            return "https:" + url + "_" + size + "x" + size + ".jpg";
        }
    }
    public static String getTicket(String url) {
        if (url.startsWith("http") || url.startsWith("https")) {
            return url ;
        } else {
            return "https:" + url ;
        }
    }

    public static String getSelctedPageContentUrl(int mCurrentItem) {
        return "recommend/" + mCurrentItem;
    }

    public static String getOnSellPageUrl(int mCurrentPage) {
        return "onSell/" + mCurrentPage;
    }
}
